import request from '@/api/request'

// 分页查询试卷分值
export function getPaperScores(params: any) {
  return request({
    url: '/api/paper-score/list',
    method: 'get',
    params
  })
}

// 根据ID查询试卷分值
export function getPaperScoreById(id: number) {
  return request({
    url: `/api/paper-score/${id}`,
    method: 'get'
  })
}

// 新增试卷分值
export function createPaperScore(data: any) {
  return request({
    url: '/api/paper-score',
    method: 'post',
    data
  })
}

// 更新试卷分值
export function updatePaperScore(data: any) {
  return request({
    url: '/api/paper-score',
    method: 'put',
    data
  })
}

// 删除试卷分值
export function deletePaperScore(id: number) {
  return request({
    url: `/api/paper-score/${id}`,
    method: 'delete'
  })
}